<?php
declare (strict_types = 1);

namespace app\demo\controller;

use app\BaseController;
use app\model\Goods;


class Index extends BaseController
{
    public function index()
    {
        $list = Goods::limit(0,4)->select();
        return view('index',['list'=>$list]);
    }

    public function page(){
        $list = Goods::select();
        return view('',['list'=>$list]);
    }

    public function good($id){
        //var_dump($id);
        $list = Goods::where('id',$id)->find();
        return view('',['list'=>$list]);
    }

    public function buy($good_name,$price){

        $order = date("Y-m-d H:i:s");
        var_dump($order);die();

        $u = NEW \PayCon();
        $u->index($good_name,$price);
    }
}
